package com.app.web.base.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Project: web<br>
 * Description: 用户资源实体表<br>
 * Copyright (c) 2012<br>
 * All Rights Reserved.<br>
 * @author <a href="mailto:gly420@163.com">GuanLuYong</a><br>
 */
@Entity
@Table(name = "WEB_USER_RESOURCE")
public class UserResource extends BaseModel implements Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 用户对资源操作权限值
	 */
	@Column(name = "PERMISSION")
	private Long Permission;
	/**
	 * 用户
	 */
	@ManyToOne
	@JoinColumn(name = "USER_ID")
	private User user;
	/**
	 * 资源
	 */
	@ManyToOne
	@JoinColumn(name = "RES_ID")
	private Resource res;

	// Getter & Setter
	public Long getPermission() {
		return Permission;
	}

	public void setPermission(Long permission) {
		Permission = permission;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Resource getRes() {
		return res;
	}

	public void setRes(Resource res) {
		this.res = res;
	}
	
}
